﻿<UserControl xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"  x:Class="SharpMod.SilverLight.Demo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:NmSlUi="clr-namespace:SharpMod.SilverLight.UI;assembly=SharpMod.SilverLight.UI"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="120"/>
            <RowDefinition Height="70"/>

        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3"  >
            <Border Padding="4" BorderBrush="Gray" BorderThickness="1">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Position :" Foreground="White"></TextBlock>
                    <NmSlUi:LedPresenter x:Name="LblTrackPos"  Background="Black" Foreground="Orange"  FontSize="25" DigitCount="5" ></NmSlUi:LedPresenter>
                </StackPanel>
            </Border>
            <Border Padding="4" BorderBrush="Gray" BorderThickness="1">
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Bpm :" Foreground="White"></TextBlock>
                        <NmSlUi:LedPresenter x:Name="LblBpm"  Background="Black" Foreground="Orange"  FontSize="25" DigitCount="3" ></NmSlUi:LedPresenter>                        
                    </StackPanel>
                    <Slider x:Name="BpmSlide" ValueChanged="BpmSlide_ValueChanged" Width="150"  Minimum="0" Maximum="2" SmallChange="0.05" LargeChange="0.5" ></Slider>
                </StackPanel>
            </Border>
        </StackPanel>


        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"  >
            <Border Padding="4" BorderBrush="Gray" BorderThickness="1" >
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="Left" Foreground="White">
                    </TextBlock>
                    <NmSlUi:VuMeter x:Name="VuMeterLeft" Width="150" Height="80" HorizontalAlignment="Stretch" 
                          VerticalAlignment="Stretch"  ></NmSlUi:VuMeter>
                </StackPanel>
            </Border>
            <StackPanel Orientation="Vertical">
                <TextBlock Text="VuMeter Style :" Foreground="White"></TextBlock>
                <ToggleButton x:Name="VuMeterStyle" Content="Spectrum" Click="VuMeterStyle_Checked" ></ToggleButton>
            </StackPanel>
            <Border Padding="4" BorderBrush="Gray" BorderThickness="1">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="Right" Foreground="White">
                    </TextBlock>
                    <NmSlUi:VuMeter x:Name="VuMeterRight" Width="150" Height="80" HorizontalAlignment="Stretch" 
                          VerticalAlignment="Stretch" ></NmSlUi:VuMeter>
                </StackPanel>
            </Border>
        </StackPanel>

        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Button x:Name="btnOpen" Click="btnOpen_Click"  Width="50" Content="Open"></Button>
            <Button x:Name="btnStart" Click="btnStart_Click"  Width="50" Content="Play"></Button>
            <Button x:Name="btnStop" Click="btnStop_Click"  Width="50" Content="Stop"></Button>
            
        </StackPanel>
        <!--<CheckBox x:Name="CheckNoVuMeter" Click="CheckNoVuMeter_Click" Content="No VuMeter" Grid.Row="2" Grid.Column="0"></CheckBox>-->
        <StackPanel Orientation="Vertical" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
            <NmSlUi:LedPresenter x:Name="LblTrackNfo0"  Background="Black" Foreground="Orange"  FontSize="20" DigitCount="33"></NmSlUi:LedPresenter>
            <NmSlUi:LedPresenter x:Name="LblTrackNfo1"  Background="Black" Foreground="Orange"  FontSize="20" DigitCount="33"></NmSlUi:LedPresenter>
            <NmSlUi:LedPresenter x:Name="LblTrackNfo2"  Background="Black" Foreground="Orange"  FontSize="20" DigitCount="33"></NmSlUi:LedPresenter>
            <NmSlUi:LedPresenter x:Name="LblTrackNfo3"  Background="Black" Foreground="Orange"  FontSize="20" DigitCount="33"></NmSlUi:LedPresenter>
        </StackPanel>

        <MediaElement x:Name="MyMediaElement" AutoPlay="False" IsMuted="False" Volume="1"></MediaElement>
    </Grid>
</UserControl>
